﻿using System;
using System.Linq;
using YuYuKiCms.Dal.Interface;
using YuYuKiCms.Dal.Model;

namespace YuYuKiCms.Dal.Repository
{
    internal class UserAccountRepository : BaseRepository<UserAccount>, IUserAccountRepository
    {
        public UserAccountRepository(IYuyukiModelUnitOfWork db) : base(db)
        {
        }

        public UserAccount GetByEmail(string email)
        {
            return Db.UserAccounts.FirstOrDefault(
                f => f.Email.Equals(email, StringComparison.OrdinalIgnoreCase));
        }
    }
}